home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / c-runtime / tests / RCS / SubClass4.m,v < prev    next >
Encoding:
Text File  |  1992-08-18  |  1.0 KB  |  75 lines

  1. head    1.1;
  2. access;
  3. symbols;
  4. locks
  5.     dglattin:1.1; strict;
  6. comment    @# @;
  7.  
  8.  
  9. 1.1
  10. date    92.08.18.04.58.04;    author dglattin;    state Exp;
  11. branches;
  12. next    ;
  13.  
  14.  
  15. desc
  16. @test code.
  17. @
  18.  
  19.  
  20. 1.1
  21. log
  22. @Initial revision
  23. @
  24. text
  25. @#include  <SubClass4.h>
  26. #include  <stdio.h>
  27.  
  28.  
  29. @@implementation SubClass4
  30.  
  31.  
  32. + initialize {
  33.  
  34.  
  35.   printf( "If you see this message then SubClass4 received a"
  36.     " +initialize method\n" );
  37.   return self;
  38. }
  39.  
  40. +newOther {
  41.  
  42.  
  43.   return [ super newOther ];
  44. }
  45.  
  46.  
  47. + ( int )return12 { 
  48.  
  49.  
  50.   [ SubClass1 newOther ];   /* Due to compiler design, 
  51.                               this should not be a infinite loop. */
  52.   return [ super return12 ] + 1 ; 
  53. }
  54.  
  55.  
  56. - ( int )return15 { 
  57.  
  58.  
  59.   [ SubClass1 newOther ];   /* Due to compiler design, 
  60.                               this should not be a infinite loop. */
  61.   return [ super return15 ]; 
  62. }
  63. - ( int )return33 { return [ super return33 ] + 1; }
  64. - ( int )return45 { 
  65.  
  66.  
  67.   [ SubClass1 newOther ];   /* Due to compiler design, 
  68.                               this should not be a infinite loop. */
  69.   return 45; 
  70. }
  71.  
  72.  
  73. @@end
  74. @
  75.